#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;

/*
s(x) is the sum of the digits of Integer x

s(a) >= n, s(b) >= n, s(a + b) <= m   1 <= n, m <= 1129

we can construct a sum which is the form of 10000000...000

a is 555555555555...55
b is 444444444444...45
a + b is 100000000...000

*/

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    for(int i = 1; i <= 1000; i ++){
        cout << 5;
    }
    cout << '\n';

    
    for(int i = 1; i <= 999; i ++){
        cout << 4;
    }
    cout << 5;
    cout << '\n';


    return 0;
}